<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../styles/css/index.css">
    <script src="../lib/layui/layui.js"></script>
    <style>
        .txt {
            color: red;
        }
        .layui-form-label {
            padding: 9px 10px;
            width: 90px;
        }
    </style>
</head>
<body>
<div class="headTitle">
    监控警告
</div>
<form class="layui-form" action="">
    <div class="layui-row">
        <div class="layui-col-md2">&nbsp;</div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>采集方式</label>
                <div class="layui-input-block">
                    <select name="city5" lay-verify="required">
                        <option value="">普通</option>
                        <option value="1">农场B</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>监控种类</label>
                <div class="layui-input-block">
                    <select name="city" required="" lay-verify="required">
                        <option value="">请选择</option>
                        <option value="1">请选择1</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-md2">&nbsp;</div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">&nbsp;</div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>设备号</label>
                <div class="layui-input-block">
                    <select name="city5" lay-verify="required">
                        <option value="">普通</option>
                        <option value="1">农场B</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>是否启用</label>
                <div class="layui-input-block">
                    <input type="checkbox" checked="" name="open" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF">
                </div>
            </div>
        </div>
        <div class="layui-col-md2">&nbsp;</div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">&nbsp;</div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>监测种类</label>
                <div class="layui-input-block">
                    <select name="city5" lay-verify="required">
                        <option value="">普通</option>
                        <option value="1">农场B</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>监测时间</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1">
                </div>
            </div>
        </div>
        <div class="layui-col-md2">&nbsp;</div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">&nbsp;</div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>告警上限</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>告警上限内容</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-md2">&nbsp;</div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">&nbsp;</div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>告警下限</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="txt">*</i>告警下限内容</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-md2">&nbsp;</div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12" style="text-align: center">
            <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
            <button class="layui-btn layui-btn-primary">取消</button>
        </div>
    </div>
</form>
<script>
    layui.use('form', function () {
        var form = layui.form;
        //监听查询
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });

    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test1'
            ,range: true
        });
    });
</script>
</body>

</html>